package eteam.aps.service;

import eteam.aps.model.entity.other.ScanProcess;
import eteam.aps.model.entity.other.ScanReport;
import eteam.aps.model.vo.scan.ScanInvVo;
import eteam.aps.model.vo.scan.ScanProcessShow;

import java.util.List;
import java.util.Map;

/**
 * 工单工序 业务层
 *
 * @author LiuLei
 */
public interface MocoRdersProcessService {

    /**
     * 根据扫描信息返回扫描数据
     *
     * @param scanProcess 扫描值
     * @return 扫描数据
     * @throws Exception 异常
     */
    ScanProcessShow<?> scanInfo(ScanProcess scanProcess) throws Exception;

    /**
     * 查询工序物料信息
     *
     * @param scanProcess 扫描值
     * @return 工序物料信息
     */
    ScanInvVo selectInv(ScanProcess scanProcess);

    /**
     * 扫描物料工序
     *
     * @param scanProcess 扫描值
     * @return 物料信息
     * @throws Exception 异常
     */
    ScanProcessShow<ScanInvVo> scanInv(ScanProcess scanProcess) throws Exception;

    /**
     * 统计
     *
     * @param scanProcess 扫描值
     * @return 物料信息
     */
    ScanReport selectTotal(ScanProcess scanProcess);

    /**
     * 报工
     *
     * @param scanProcess 扫描值
     * @return 报工信息
     */
    ScanProcessShow<Void> submit(ScanProcess scanProcess) throws Exception;

    /**
     * 确认报工
     *
     * @param scanProcess 扫描值
     * @return 报工信息
     */
    ScanProcessShow<Void> sureSubmit(ScanProcess scanProcess) throws Exception;

    /**
     * 撤销物料
     *
     * @param scanProcess 扫描值
     * @return 物料信息
     */
    ScanProcessShow<ScanInvVo> delInv(ScanProcess scanProcess) throws Exception;

    /**
     * 查询最近三次扫描信息
     *
     * @param scanProcess 扫描值
     * @return 最近三次信息
     */
    Map<String,Object> selectLastThree(ScanProcess scanProcess);
}
